{extend name='admin@main'}

{block name="content"}

{include file='store@goods/form_style'}
<style type="text/css">
  .layui-disabled, .layui-disabled:hover {
    color: #333 !important;
    cursor: not-allowed !important;
}
</style>
<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-body think-box-shadow padding-left-40">
  <div class="layui-form-item">
    <label class="layui-form-label">商品名称</label>
    <div class="layui-input-block">
      <input name="name" lay-verify="name" readonly="readonly" value="{$result.name}" autocomplete="off" placeholder="请输入商品名称" class="layui-input" type="text">
    </div>
  </div>
    <div class="layui-form-item ">
      
      <div class="layui-inline">
        <label class="layui-form-label">商品类型</label>
        <div class="layui-input-inline">
         <select class="layui-select"  name="tid" disabled="disabled"  lay-search>
            <option value="" selected="selected">请选择商品类型</option>
              {foreach $marktype as $marktype}
              {if  $result.tid eq $marktype.id}
              <option selected value="{$marktype.id}">{$marktype.name}</option>
              {else}
              <option value="{$marktype.id}">{$marktype.name}</option>
              {/if}
            {/foreach}
            </select>
        </div>
      </div>

      <div class="layui-inline">
        <label class="layui-form-label">商品原价</label>
        <div class="layui-input-inline">
          <input name="oprice" lay-verify="oprice" readonly="readonly" value="{$result.oprice}" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">商品卖价</label>
        <div class="layui-input-inline">
          <input name="money" lay-verify="money" readonly="readonly" value="{$result.money}" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">联系人</label>
        <div class="layui-input-inline">
          <input name="contacts" lay-verify="contacts" readonly="readonly" value="{$result.contacts}" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-inline">
          <input name="mobile" lay-verify="mobile" readonly="readonly" value="{$result.mobile}" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>

    </div>

    <div class="layui-form-item ">

      
      <div class="layui-inline">
        <label class="layui-form-label" >所在省份:</label>
        <div class="layui-input-inline" >
          <input name="province" placeholder="" readonly="readonly"  value="{$address.province}"  autocomplete="off" class="layui-input" type="text">
        </div>
      </div>

      <div class="layui-inline">
        <label class="layui-form-label" >所在城市:</label>
        <div class="layui-input-inline" >
          <input name="city" placeholder=""  readonly="readonly"  value="{$address.city}"  autocomplete="off" class="layui-input" type="text">
        </div>
      </div>

      <div class="layui-inline">
        <label class="layui-form-label" >所在地区:</label>
        <div class="layui-input-inline" >
          <input name="city" placeholder=""  readonly="readonly"  value="{$address.county}"  autocomplete="off" class="layui-input" type="text">
        </div>
      </div>
    <div class="layui-inline">
      <label class="layui-form-label">详细地址</label>
      <div class="layui-input-inline">
        <input name="address" lay-verify="address" readonly="readonly" value="{$result.address}" autocomplete="off" class="layui-input" type="text">
      </div>
    </div>
    
    <div class="layui-inline">
        <label class="layui-form-label">是否置顶</label>
        <div class="layui-input-block">
          <input name="top" value="1" disabled ="disabled" title="是" {eq name='$result.top' value='1'} checked {/eq} type="radio">
          <input name="top" value="0" disabled ="disabled" title="否" {eq name='$result.top' value='0'} checked {/eq} type="radio">
        </div>
      </div>

    </div>

    <div class="layui-form-item ">

       <div class="layui-inline">
      <label class="layui-form-label">商品成色</label>
      <div class="layui-input-inline">
        <input name="depreciation" lay-verify="depreciation" value="{$result.depreciation}" placeholder="请输入商品成色" autocomplete="off" class="layui-input" type="text">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">微信号</label>
      <div class="layui-input-inline">
        <input name="wechat_num" lay-verify="wechat_num" value="{$result.wechat_num}" placeholder="请输入微信号" autocomplete="off" class="layui-input" type="text">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">QQ号</label>
      <div class="layui-input-inline">
        <input name="qq_num" lay-verify="qq_num" value="{$result.qq_num}" placeholder="请输入QQ号" autocomplete="off" class="layui-input" type="text">
      </div>
    </div>
      

      <!-- <div class="layui-inline">
        <label class="layui-form-label">分享次数</label>
        <div class="layui-input-inline">
          <input name="share_num" lay-verify="share_num" readonly="readonly" value="{$result.share_num}" autocomplete="off" class="layui-input" type="text">
        </div>
      </div> -->

      <div class="layui-inline">
        <label class="layui-form-label">添加时间</label>
        <div class="layui-input-inline">
          <input name="add_time" lay-verify="add_time" readonly="readonly" value="{$result.add_time}" autocomplete="off" class="layui-input" type="text">
        </div>
      </div>

      <!-- <div class="layui-inline">
        <label class="layui-form-label">来源</label>
        <div class="layui-input-block">
          <input name="type" value="1" disabled ="disabled" title="后台" {eq name='$result.type' value='1'} checked {/eq} type="radio">
          <input name="type" value="0" disabled ="disabled" title="前端" {eq name='$result.type' value='0'} checked {/eq} type="radio">
          
        </div>
      </div> -->
      

      <div class="layui-inline">
      <label class="layui-form-label">是否上架</label>
      <div class="layui-input-block">
        <input name="is_show" value="1" disabled ="disabled" title="是" {eq name='$result.is_show' value='1'} checked {/eq} type="radio">
        <input name="is_show" value="0" disabled ="disabled" title="已下架" {eq name='$result.is_show' value='0'} checked {/eq} type="radio">
      </div>
    </div>
      

     


    </div>
      <div class="layui-form-item">
      <label class="layui-form-label">商品LOGO及展示图片</label>
      <table class="layui-table " style="width: 80%;">
          <thead>
          <tr>
              <th class="text-center">LOGO</th>
              <th class="text-left">展示图片</th>
          </tr>
          <tr style="background-color: #ffff;">
              <td width="90px" class="text-center"><input disabled ="disabled" name="logo" type="hidden" value="{$result.logo|default=''}"></td>
              <td width="auto" class="text-left"><input disabled ="disabled" name="image" type="hidden" value="{$result.image|default=''}"></td>
          </tr>
          </thead>
      </table>
      <script>$('[name="logo"]').uploadOneImage(), $('[name="image"]').uploadMultipleImage()</script>
    </div>
    <div class="layui-form-item ">
       <label class="layui-form-label">商品详情</label>
      <div class="layui-inline">
           
            <textarea rows="8" cols="150" name="content"  readonly="readonly">{$result.content|default=''}</textarea>
      </div>
    </div>
    
    
</div>
</form>
{/block}

{block name='script'}

<script>
  window.form.render();
  layui.use('laydate', function(){
    var laydate = layui.laydate;
    //常规用法
    laydate.render({
      elem: '#test1'
    });
    laydate.render({
      elem: '#test2'
    });
    
  });

  
</script>

{/block}